package biz.obake.team.touchprotector.ui;

import android.os.Build;
import android.os.Bundle;
import androidx.preference.Preference;
import biz.obake.team.touchprotector.R;
import biz.obake.team.touchprotector.c;
import biz.obake.team.touchprotector.g.a;
import biz.obake.team.touchprotector.tpservice.TPService;

public class Tab_WhileLocked extends a {
    public void onCreatePreferences(Bundle bundle, String str) {
        setPreferencesFromResource(R.xml.ui_tab_whilelocked, str);
        getPreferenceScreen().H0("backlight").s0(new Preference.e() {
            public boolean onPreferenceClick(Preference preference) {
                TPService.k("Backlight", "Backlight");
                return true;
            }
        });
        if (Build.VERSION.SDK_INT < 26) {
            prefRemove("show_notification_drawer");
        }
        if (Build.VERSION.SDK_INT < 26 || !c.n()) {
            prefRemove("show_navigation_bar");
        }
    }

    /* access modifiers changed from: protected */
    public void onUpdateDisplay() {
        String str;
        Preference H0 = getPreferenceScreen().H0("backlight");
        int j = a.j("backlight");
        if (-1 == j) {
            str = c.w(R.string.pv_backlignt_no_control);
        } else {
            str = String.format("%d%%", new Object[]{Integer.valueOf(j)});
        }
        H0.v0(str);
        getPreferenceScreen().H0("vibrate_length").v0(c.c(R.array.vibrate_length_entries, c.a(R.array.vibrate_length_values, a.l("vibrate_length"))));
    }
}
